package com.cnsoft.persistent.player.U102040Thumbs;

import org.cnsoft.framework.db.manager.MyDBTableSQLSupport;
import org.springframework.stereotype.Component;

/**
 * 会员点赞表建表语句
 */
@Component("U102040ThumbsSQL")
//@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class U102040ThumbsSQL extends MyDBTableSQLSupport {
	// 表名
	public String getTableName() {
		return "u102040_thumbs";
	}

	// 获得SQL内容
	public String getSQL() throws Exception {
		StringBuilder sqlStringBuilder = new StringBuilder();// 临时变量

		sqlStringBuilder.append("CREATE TABLE u102040_thumbs");
		sqlStringBuilder.append("(");
		sqlStringBuilder.append("    id VARCHAR(20) NOT NULL COMMENT '流水ID',");
		sqlStringBuilder.append("    user_id VARCHAR(64) NOT NULL COMMENT '会员ID',");
		sqlStringBuilder.append("    nick_name VARCHAR(80) NOT NULL COMMENT '昵称',");
		sqlStringBuilder.append("    sex VARCHAR(4) COMMENT '性别',");
		sqlStringBuilder.append("    user_phone VARCHAR(64) NOT NULL COMMENT '手机号码',");
		sqlStringBuilder.append("    type_code VARCHAR(4) NOT NULL COMMENT '数据分类编码（1广告2文章4活动5任务6投票7问卷A商品B外卖C优惠券）',");
		sqlStringBuilder.append("    type_name VARCHAR(20) COMMENT '数据分类说明',");
		sqlStringBuilder.append("    item_id VARCHAR(64) NOT NULL COMMENT '数据ID',");
		sqlStringBuilder.append("    item_title VARCHAR(200) NOT NULL COMMENT '数据标题',");
		sqlStringBuilder.append("    item_pic_url VARCHAR(400) COMMENT '数据封面图片',");
		sqlStringBuilder.append("    memo VARCHAR(200) COMMENT '备注',");
		sqlStringBuilder.append("    fb1 VARCHAR(40) COMMENT '备用1',");
		sqlStringBuilder.append("    fb2 VARCHAR(20) COMMENT '备用2',");
		sqlStringBuilder.append("    fb3 VARCHAR(20) COMMENT '备用3',");
		sqlStringBuilder.append("    fb4 VARCHAR(200) COMMENT '备用4',");
		sqlStringBuilder.append("    fb5 VARCHAR(20) COMMENT '备用5',");
		sqlStringBuilder.append("    eb1 VARCHAR(40) COMMENT '扩展1',");
		sqlStringBuilder.append("    eb2 VARCHAR(80) COMMENT '扩展2',");
		sqlStringBuilder.append("    eb3 VARCHAR(20) COMMENT '扩展3',");
		sqlStringBuilder.append("    eb4 VARCHAR(10) COMMENT '扩展4',");
		sqlStringBuilder.append("    eb5 VARCHAR(10) COMMENT '扩展5',");
		sqlStringBuilder.append("    sid VARCHAR(20) COMMENT '数据归属系统',");
		sqlStringBuilder.append("    del_flag CHAR(1) DEFAULT '0' NOT NULL COMMENT '有效标识',");
		sqlStringBuilder.append("    create_time VARCHAR(24) DEFAULT '2017/11/12 23:00:00' NOT NULL COMMENT '创建时间',");
		sqlStringBuilder.append("    creator VARCHAR(20) DEFAULT 'SYSTEM' NOT NULL COMMENT '创建者',");
		sqlStringBuilder.append("    update_time VARCHAR(24) DEFAULT '2017/11/12 23:00:00' COMMENT '更新时间',");
		sqlStringBuilder.append("    updator VARCHAR(20) COMMENT '最后更新者',");
		sqlStringBuilder.append("  PRIMARY KEY (id)");
		sqlStringBuilder.append(") COMMENT '会员点赞表';");

		return sqlStringBuilder.toString();
	}

}
